home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 467 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.7 KB

  1. Path: chronicle.mti.sgi.com!austern
  2. From: jbuck@Synopsys.COM (Joe Buck)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: The realloc question: rationale?
  5. Date: 23 Feb 1996 10:59:06 PST
  6. Organization: Synopsys Inc., Mountain View, CA 94043-4033
  7. Approved: austern@isolde.mti.sgi.com
  8. Message-ID: <4gl2ad$lqi@hermes.synopsys.com>
  9. References: <4g903m$7g8@mari.onr.com>
  10. NNTP-Posting-Host: isolde.mti.sgi.com
  11. X-Original-Date: 23 Feb 1996 18:50:53 GMT
  12. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  13.     iQBVAwUBMS4Oh0y4NqrwXLNJAQELyAH/eoMGhdqQSoCyVntG6dqUUU9lf6G3xf8K
  14.     CutZlOUB5lPp/+iiROMkzcB0evmEOeG3hIIE8/363YoQe0xWErvu9w==
  15.     =PiXL
  16. Originator: austern@isolde.mti.sgi.com
  17.  
  18. Kerry Kimbrough <kk@onr.com> writes:
  19. >I gather from a recent message here that ANSI C++ (still) does not
  20. >define the moral equivalent of realloc().
  21.  
  22. You can, of course, call the C realloc().
  23.  
  24. As I have proposed before in this group, a relocation "algorithm" could be
  25. added to the STL, and used when vectors and deques are extended.  By
  26. default, relocation would consist of a copy constructor call plus a
  27. destructor call, but it could be specialized on a per-class basis
  28. to something more efficient.
  29.  
  30. No extension to the language is needed, only to the STL.
  31. -- 
  32. -- Joe Buck     <jbuck@synopsys.com>    (not speaking for Synopsys, Inc)
  33.  
  34. Work for something because it is good,
  35. not just because it stands a chance to succeed.       -- Vaclav Havel
  36. ---
  37. [ To submit articles: Try just posting with your newsreader.  If that fails,
  38.                       use mailto:std-c++@ncar.ucar.edu
  39.   FAQ:    http://reality.sgi.com/employees/austern_mti/std-c++/faq.html
  40.   Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html
  41.   Comments? mailto:std-c++-request@ncar.ucar.edu 
  42. ]
  43.